<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<jQuery.Validation.Web.Models.Registration>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Sample Registration Page
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Register</h2>

    <%= Html.ValidationSummary() %>

    <% using (Html.BeginForm("Register", "Home", FormMethod.Post, new {id="registerForm"})) {%>
        <fieldset>
            <legend>Fields</legend>
            <p>
                <%= Html.LabelFor(model => model.UserName) %>
                <%= Html.TextBoxFor(model => model.UserName) %>
                <%= Html.ValidationMessageFor(model => model.UserName) %>
            </p>
            <p>
                <%= Html.LabelFor(model => model.EmailAddress) %>
                <%= Html.TextBoxFor(model => model.EmailAddress) %>
                <%= Html.ValidationMessageFor(model => model.EmailAddress) %>
            </p>
            <p>
                <%= Html.LabelFor(model => model.Password) %>
                <%= Html.TextBoxFor(model => model.Password) %>
                <%= Html.ValidationMessageFor(model => model.Password) %>
            </p>
            <p>
                <%= Html.LabelFor(model => model.VerificationPassword) %>
                <%= Html.TextBoxFor(model => model.VerificationPassword) %>
                <%= Html.ValidationMessageFor(model => model.VerificationPassword) %>
            </p>
            <p>
                <%= Html.LabelFor(model => model.Age) %>
                <%= Html.TextBoxFor(model => model.Age) %>
                <%= Html.ValidationMessageFor(model => model.Age) %>
            </p>
            <p>
                <%= Html.LabelFor(model => model.WebSite) %>
                <%= Html.TextBoxFor(model => model.WebSite) %>
                <%= Html.ValidationMessageFor(model => model.WebSite) %>
            </p>
            <p>
                <%= Html.LabelFor(model => model.BankBalance) %>
                <%= Html.TextBoxFor(model => model.BankBalance) %>
                <%= Html.ValidationMessageFor(model => model.BankBalance) %>
            </p>
            <p>
                <%= Html.LabelFor(model => model.CreditCard) %>
                <%= Html.TextBoxFor(model => model.CreditCard) %>
                <%= Html.ValidationMessageFor(model => model.CreditCard) %>
            </p>
            <p>
                <%= Html.LabelFor(model => model.Comments) %>
                <%= Html.TextBoxFor(model => model.Comments) %>
                <%= Html.ValidationMessageFor(model => model.Comments) %>
            </p>
            <p>
                <%= Html.LabelFor(model => model.BirthDate) %>
                <%= Html.TextBoxFor(model => model.BirthDate) %>
                <%= Html.ValidationMessageFor(model => model.BirthDate) %>
            </p>
            <p>
                <%= Html.LabelFor(model => model.ProfilePicture) %>
                <%= Html.TextBoxFor(model => model.ProfilePicture) %>
                <%= Html.ValidationMessageFor(model => model.ProfilePicture) %>
            </p>
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>
    <% } %>


    <script type="text/javascript">
        $("#registerForm").validate();
        <%= Html.jQueryValidationFor(model => model.Age) %>
        <%= Html.jQueryValidationFor(model => model.BankBalance) %>
        <%= Html.jQueryValidationFor(model => model.BirthDate) %>
        <%= Html.jQueryValidationFor(model => model.Comments) %>
        <%= Html.jQueryValidationFor(model => model.CreditCard) %>
        <%= Html.jQueryValidationFor(model => model.EmailAddress) %>
        <%= Html.jQueryValidationFor(model => model.Password) %>
        <%= Html.jQueryValidationFor(model => model.ProfilePicture) %>
        <%= Html.jQueryValidationFor(model => model.UserName) %>
        <%= Html.jQueryValidationFor(model => model.VerificationPassword ) %>
        <%= Html.jQueryValidationFor(model => model.WebSite ) %>
    </script>

</asp:Content>

